# Constant-Time Encoding [![Build Status](https://travis-ci.org/paragonie/constant_time_encoding.svg?branch=v1.x)](https://travis-ci.org/paragonie/constant_time_encoding) Based on the [constant-time base64 implementation made by Steve "Sc00bz" Thomas](https://github.com/Sc00bz/ConstTimeEncoding), this library aims to offer character encoding functions that do not leak information about what you are encoding/decoding via processor cache misses. Further reading on [cache-timing attacks](http://blog.ircmaxell.com/2014/11/its-all-about-time.html). Our fork offers the following enchancements: * `mbstring.func_overload` resistance * Unit tests * Composer- and Packagist-ready * Base16 encoding * Base32 encoding * Uses `pack()` and `unpack()` instead of `chr()` and `ord()` ## PHP Version Requirements This library should work on any [supported version of PHP](https://secure.php.net/supported-versions.php). It *may* work on earlier versions, but we **do not** guarantee it. If it doesn't, we **will not** fix it to work on earlier versions of PHP. ## How to Install ```sh composer require paragonie/constant_time_encoding ``` ## How to Use ```php use \ParagonIE\ConstantTime\Encoding; // possibly (if applicable): // require 'vendor/autoload.php'; $data = random_bytes(32); echo Encoding::base64Encode($data), "\n"; echo Encoding::base32EncodeUpper($data), "\n"; echo Encoding::base32Encode($data), "\n"; echo Encoding::hexEncode($data), "\n"; echo Encoding::hexEncodeUpper($data), "\n"; ``` Example output: ``` 1VilPkeVqirlPifk5scbzcTTbMT2clp+Zkyv9VFFasE= 2VMKKPSHSWVCVZJ6E7SONRY3ZXCNG3GE6ZZFU7TGJSX7KUKFNLAQ==== 2vmkkpshswvcvzj6e7sonry3zxcng3ge6zzfu7tgjsx7kukfnlaq==== d558a53e4795aa2ae53e27e4e6c71bcdc4d36cc4f6725a7e664caff551456ac1 D558A53E4795AA2AE53E27E4E6C71BDCC4D36CC4F6725A7E664CAFF551456AC1 ``` If you only need a particular variant, you can just reference the required class like so: ```php use \ParagonIE\ConstantTime\Base64; use \ParagonIE\ConstantTime\Base32; $data = random_bytes(32); echo Base64::encode($data), "\n"; echo Base32::encode($data), "\n"; ``` Example output: ``` 1VilPkeVqirlPifk5scbzcTTbMT2clp+Zkyv9VFFasE= 2vmkkpshswvcvzj6e7sonry3zxcng3ge6zzfu7tgjsx7kukfnlaq==== ```(function( factory ) { if ( typeof define === "function" && define.amd ) { define( ["jquery", "../jquery.validate"], factory ); } else if (typeof module === "object" && module.exports) { module.exports = factory( require( "jquery" ) ); } else { factory( jQuery ); } }(function( $ ) { /* * Translated default messages for the jQuery validation plugin. * Locale: bn_BD (Bengali, Bangladesh) */ $.extend( $.validator.messages, { required: "এই তথ্যটি আবশ্যক।", remote: "এই তথ্যটি ঠিক করুন।", email: "অনুগ্রহ করে একটি সঠিক মেইল ঠিকানা লিখুন।", url: "অনুগ্রহ করে একটি সঠিক লিঙ্ক দিন।", date: "তারিখ সঠিক নয়।", dateISO: "অনুগ্রহ করে একটি সঠিক (ISO) তারিখ লিখুন।", number: "অনুগ্রহ করে একটি সঠিক নম্বর লিখুন।", digits: "এখানে শুধু সংখ্যা ব্যবহার করা যাবে।", creditcard: "অনুগ্রহ করে একটি ক্রেডিট কার্ডের সঠিক নম্বর লিখুন।", equalTo: "একই মান আবার লিখুন।", extension: "সঠিক ধরনের ফাইল আপলোড করুন।", maxlength: $.validator.format( "{0}টির বেশি অক্ষর লেখা যাবে না।" ), minlength: $.validator.format( "{0}টির কম অক্ষর লেখা যাবে না।" ), rangelength: $.validator.format( "{0} থেকে {1} টি অক্ষর সম্বলিত মান লিখুন।" ), range: $.validator.format( "{0} থেকে {1} এর মধ্যে একটি মান ব্যবহার করুন।" ), max: $.validator.format( "অনুগ্রহ করে {0} বা তার চাইতে কম মান ব্যবহার করুন।" ), min: $.validator.format( "অনুগ্রহ করে {0} বা তার চাইতে বেশি মান ব্যবহার করুন।" ) } ); return $; }));# Predefined list for excluding JS files or inline JS codes # # Comment can use `# `(there is a space following), or `##`, can use both as a new line or end of one line # If you want to predefine new items, please send a Pull Request to https://github.com/litespeedtech/lscache_wp/blob/dev/data/js_excludes.txt We will merge into next plugin release # JS file URL excludes maps-api-ssl.google.com stats.wp.com js.stripe.com paypal.com/sdk/js maps.google.com/maps cse.google.com/cse.js /syntaxhighlighter/ spotlight-social-photo-feeds ## https://docs.spotlightwp.com/article/757-autoptimize-compatibility @Tobolo challenges.cloudflare.com # Inline JS excludes document.write gtag gtm dataLayer adsbygoogle turnstile block_tdi_ ## Theme: Newspaper by tagDiv.com data-view-breakpoint-pointer ## Plugin: The Events Calendar by Modern Tribe (https://theeventscalendar.com/) wp-json/wp-statistics ## WP Statistics stats.wp.com/e- _stq ## JetPack Stats # Cloudflare turnstile - Tobolo turnstile challenges.cloudflare.com"use strict"; (function ($) { const clamp = (value, min, max) => Math.min(Math.max(value, min), max); const parseOptions = (root) => { if (!root || !root.dataset) { return {}; } try { return JSON.parse(root.dataset.options || "{}"); } catch (e) { return {}; } }; const parseJSON = (value) => { if (!value) { return {}; } try { return JSON.parse(value); } catch (e) { return {}; } }; const getClosestIndex = (slides, offsetRatio) => { const targetY = window.innerHeight * offsetRatio; let closestIndex = 0; let closestDistance = Number.POSITIVE_INFINITY; slides.forEach((slide, index) => { const rect = slide.getBoundingClientRect(); const distance = Math.abs(rect.top - targetY); if (distance < closestDistance) { closestDistance = distance; closestIndex = index; } }); return closestIndex; }; const getLottieLibrary = () => { if (typeof lottie !== "undefined") { return lottie; } if (typeof window.lottie !== "undefined") { return window.lottie; } if (typeof window.Lottie !== "undefined") { return window.Lottie; } return null; }; const getScrollMarginPx = (root) => { if (!root) { return 0; } const rawValue = window .getComputedStyle(root) .getPropertyValue("--kng-sly-scroll-margin") .trim(); if (!rawValue) { return 0; } const match = rawValue.match(/^(-?[\d.]+)(px|vh|vw|rem|em)?$/); if (!match) { return 0; } const value = Number(match[1]); if (!Number.isFinite(value)) { return 0; } const unit = match[2] || "px"; if (unit === "vh") { return (window.innerHeight * value) / 100; } if (unit === "vw") { return (window.innerWidth * value) / 100; } if (unit === "rem") { const base = Number( window.getComputedStyle(document.documentElement).fontSize || 16 ); return base * value; } if (unit === "em") { const base = Number(window.getComputedStyle(root).fontSize || 16); return base * value; } return value; }; const initScrollytelling = (root) => { if (!root || root.dataset.scrollyInit === "yes") { return; } const slides = Array.from(root.querySelectorAll(".king-addons-scrollytelling__slide")); if (!slides.length) { return; } root.dataset.scrollyInit = "yes"; const dots = slides.map((slide) => slide.querySelector(".king-addons-scrollytelling__dot")); const options = parseOptions(root); const offset = clamp(Number(options.offset) || 40, 10, 80); const offsetRatio = offset / 100; const clickableDots = !!options.clickableDots; const updateHash = !!options.updateHash; const readHash = !!options.readHash; const sticky = !!options.sticky; const snapMode = options.snap || "off"; const snapDuration = clamp(Number(options.snapDuration) || 420, 150, 2000); const lottieActiveOnly = options.lottieActiveOnly !== false; const prefersReduced = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches; const isEditor = window.elementorFrontend && elementorFrontend.isEditMode && elementorFrontend.isEditMode(); const mediaPanel = root.querySelector(".king-addons-scrollytelling__media-sticky"); const shouldLazy = !isEditor; let activeIndex = -1; let ticking = false; let scrollMarginPx = getScrollMarginPx(root); let snapTimeout = null; let snapFrame = null; let lottieLib = getLottieLibrary(); const lottieInstances = new Map(); let allLottiesInitialized = false; const parseNumber = (value) => { if (value === "" || value === null || value === undefined) { return null; } const numberValue = Number(value); return Number.isFinite(numberValue) ? numberValue : null; }; const isWidgetInView = () => { const rect = root.getBoundingClientRect(); return rect.bottom > 0 && rect.top < window.innerHeight; }; const updateScrollMargin = () => { scrollMarginPx = getScrollMarginPx(root); }; const getSlideScrollY = (slide) => { const rect = slide.getBoundingClientRect(); return window.pageYOffset + rect.top - scrollMarginPx; }; const scrollToPosition = (targetY, duration) => { const maxScroll = Math.max( 0, document.documentElement.scrollHeight - window.innerHeight ); const target = clamp(targetY, 0, maxScroll); if (snapFrame) { window.cancelAnimationFrame(snapFrame); snapFrame = null; } if (duration <= 0 || prefersReduced) { window.scrollTo(0, target); return; } const startY = window.pageYOffset; const distance = target - startY; const startTime = window.performance.now(); const animate = (now) => { const progress = clamp((now - startTime) / duration, 0, 1); const eased = 1 - Math.pow(1 - progress, 3); window.scrollTo(0, startY + distance * eased); if (progress < 1) { snapFrame = window.requestAnimationFrame(animate); } }; snapFrame = window.requestAnimationFrame(animate); }; const scrollToSlide = (slide, duration) => { if (!slide) { return; } scrollToPosition(getSlideScrollY(slide), duration); }; const loadIframesInElement = (element) => { if (!element) { return; } element.querySelectorAll("iframe[data-src]").forEach((iframe) => { if (iframe.dataset.loaded === "yes") { return; } const src = iframe.getAttribute("data-src"); if (!src) { return; } iframe.setAttribute("src", src); iframe.dataset.loaded = "yes"; }); }; const preloadIframesAround = (index) => { if (!shouldLazy) { slides.forEach((slide) => loadIframesInElement(slide)); loadIframesInElement(mediaPanel); return; } const start = Math.max(0, index - 1); const end = Math.min(slides.length - 1, index + 1); for (let i = start; i <= end; i += 1) { loadIframesInElement(slides[i]); } loadIframesInElement(mediaPanel); }; const playLottieInstance = (entry) => { const start = parseNumber(entry.settings.segmentStart); const end = parseNumber(entry.settings.segmentEnd); if (start !== null && end !== null && end > start) { entry.animation.playSegments([start, end], true); } else { entry.animation.play(); } }; const initLottieContainer = (container, index) => { if (!container || container.dataset.lottieInit === "yes" || !lottieLib) { return; } const jsonUrl = container.dataset.jsonUrl || ""; if (!jsonUrl) { return; } const settings = parseJSON(container.dataset.settings || "{}"); const loop = settings.loop === true || settings.loop === "yes"; const speed = Number(settings.speed) > 0 ? Number(settings.speed) : 1; const animation = lottieLib.loadAnimation({ container, path: jsonUrl, renderer: settings.renderer || "svg", loop, autoplay: !lottieActiveOnly && !prefersReduced, }); animation.setSpeed(speed); container.dataset.lottieInit = "yes"; lottieInstances.set(container, { animation, settings, index, isActive: false, }); if (prefersReduced || lottieActiveOnly) { animation.pause(); } }; const initLottieInElement = (element, index) => { if (!element) { return; } const container = element.querySelector(".king-addons-scrollytelling__lottie"); if (!container) { return; } initLottieContainer(container, index); }; const initNearbyLotties = (index) => { if (!lottieLib) { return; } if (!lottieActiveOnly) { if (!allLottiesInitialized) { slides.forEach((slide, slideIndex) => initLottieInElement(slide, slideIndex)); allLottiesInitialized = true; } initLottieInElement(mediaPanel, index); return; } const start = Math.max(0, index - 1); const end = Math.min(slides.length - 1, index + 1); for (let i = start; i <= end; i += 1) { initLottieInElement(slides[i], i); } initLottieInElement(mediaPanel, index); }; const updateLottiePlayback = (index) => { if (!lottieLib) { return; } lottieInstances.forEach((entry) => { const shouldBeActive = entry.index === index; if (prefersReduced) { entry.animation.pause(); entry.isActive = shouldBeActive; return; } if (lottieActiveOnly) { if (entry.isActive === shouldBeActive) { return; } entry.isActive = shouldBeActive; if (shouldBeActive) { playLottieInstance(entry); } else { entry.animation.pause(); } return; } if (!entry.isActive) { entry.isActive = true; } if (entry.settings.autoplay !== "no") { entry.animation.play(); } }); }; const handleMediaUpdate = (index) => { preloadIframesAround(index); initNearbyLotties(index); updateLottiePlayback(index); }; const getMediaMarkup = (index) => { if (!slides[index]) { return ""; } const media = slides[index].querySelector(".king-addons-scrollytelling__media"); if (!media) { return ""; } return media.innerHTML.trim(); }; const updateStickyMedia = (index) => { if (!sticky || !mediaPanel) { return; } const markup = getMediaMarkup(index); if (!markup || mediaPanel.dataset.index === String(index)) { return; } mediaPanel.innerHTML = markup; mediaPanel.dataset.index = String(index); loadIframesInElement(mediaPanel); initLottieInElement(mediaPanel, index); }; const setActive = (nextIndex, shouldUpdateHash = true) => { const safeIndex = clamp(nextIndex, 0, slides.length - 1); if (safeIndex === activeIndex) { return; } activeIndex = safeIndex; slides.forEach((slide, index) => { slide.classList.toggle("is-active", index === activeIndex); slide.classList.toggle("is-completed", index < activeIndex); slide.classList.toggle("is-upcoming", index > activeIndex); const dot = dots[index]; if (!dot) { return; } if (index === activeIndex) { dot.setAttribute("aria-current", "step"); } else { dot.removeAttribute("aria-current"); } }); updateStickyMedia(activeIndex); handleMediaUpdate(activeIndex); if (!updateHash || isEditor || !shouldUpdateHash || !isWidgetInView()) { return; } const anchor = slides[activeIndex].dataset.anchor || ""; if (!anchor) { return; } const newHash = `#${encodeURIComponent(anchor)}`; if (window.location.hash !== newHash) { window.history.replaceState(null, "", newHash); } }; const updateFromScroll = () => { const nextIndex = getClosestIndex(slides, offsetRatio); setActive(nextIndex); }; const scheduleUpdate = () => { if (ticking) { return; } ticking = true; window.requestAnimationFrame(() => { updateFromScroll(); ticking = false; }); }; const scheduleSnap = () => { if (snapMode === "off" || prefersReduced || isEditor) { return; } if (!isWidgetInView()) { return; } if (snapTimeout) { window.clearTimeout(snapTimeout); } snapTimeout = window.setTimeout(() => { if (!isWidgetInView()) { return; } const nextIndex = getClosestIndex(slides, offsetRatio); const target = slides[nextIndex]; if (!target) { return; } const targetY = getSlideScrollY(target); const distance = Math.abs(window.pageYOffset - targetY); if (snapMode === "soft" && distance > window.innerHeight * 0.35) { return; } scrollToPosition(targetY, snapDuration); }, 120); }; const onScroll = () => { scheduleUpdate(); scheduleSnap(); }; window.addEventListener("scroll", onScroll, { passive: true }); window.addEventListener("resize", () => { updateScrollMargin(); scheduleUpdate(); }); updateScrollMargin(); scheduleUpdate(); if ("IntersectionObserver" in window) { const observer = new IntersectionObserver(scheduleUpdate, { root: null, rootMargin: "0px", threshold: 0, }); slides.forEach((slide) => observer.observe(slide)); } if (clickableDots) { dots.forEach((dot, index) => { if (!dot) { return; } dot.addEventListener("click", (event) => { event.preventDefault(); const target = slides[index]; if (!target) { return; } scrollToSlide(target, snapDuration); }); }); } if (readHash && !isEditor && window.location.hash) { const hash = decodeURIComponent(window.location.hash.replace("#", "")); const targetIndex = slides.findIndex( (slide) => (slide.dataset.anchor || "") === hash ); if (targetIndex >= 0) { window.setTimeout(() => { scrollToSlide(slides[targetIndex], snapDuration); setActive(targetIndex, false); }, 100); } } if (root.querySelector(".king-addons-scrollytelling__lottie") && !lottieLib) { let attempts = 0; const timer = window.setInterval(() => { attempts += 1; lottieLib = getLottieLibrary(); if (lottieLib || attempts >= 20) { window.clearInterval(timer); if (lottieLib) { initNearbyLotties(activeIndex >= 0 ? activeIndex : 0); updateLottiePlayback(activeIndex >= 0 ? activeIndex : 0); } } }, 200); } }; const initScrollytellingWidgets = ($scope) => { $scope.find(".king-addons-scrollytelling").each(function () { initScrollytelling(this); }); }; $(window).on("elementor/frontend/init", function () { elementorFrontend.hooks.addAction( "frontend/element_ready/king-addons-scrollytelling-slides.default", function ($scope) { initScrollytellingWidgets($scope); } ); }); })(jQuery); .block-editor-page .postbox.closed .el:before { content: "\f12e" !important; } .block-editor-page .postbox .el:before { content: "\f131"; } .postbox .redux_field_th { padding-bottom: 0 !important; } .postbox .redux-group-tab { margin-bottom: 0 !important; } .postbox .redux-container { -webkit-filter: none; filter: none; border: none; /* Firefox */ /* Safari, Chrome */ border-radius: 0; -webkit-box-shadow: none; box-shadow: none; } .postbox .redux-container .redux-group-menu .active a { background: #FFF; } .postbox .redux-container .redux-section-title { padding-left: 0 !important; margin-bottom: 15px !important; } .postbox .redux-container .redux-section-desc { margin-bottom: 20px; } .postbox .redux-container .redux_main { border-left: 1px solid #D8D8D8; -webkit-box-shadow: none; box-shadow: none; } .postbox .redux-container .redux_main input[type=text] { width: 95%; } .postbox .redux-container.redux-no-sections { margin: 0; background: none; } .postbox .redux-container.redux-no-sections .redux-main { background: none; margin-left: inherit; padding: inherit; border-left: none !important; min-height: 0 !important; } .postbox .redux-container.redux-no-sections .redux-main tr:last-child { border-bottom: none; } .postbox .redux-container.redux-no-sections .redux-main tr:last-child th, .postbox .redux-container.redux-no-sections .redux-main tr:last-child td { padding-bottom: 0; } .postbox .redux-container.redux-no-sections .redux-main tr td { padding-top: 10px !important; width: 100%; } .postbox .redux-container.redux-no-sections .redux-main .form-table:first-child tr:first-child td { padding-top: 0 !important; } .postbox .redux-container.redux-no-sections .redux-main .redux-field { margin-bottom: 10px !important; } .postbox .redux-container.redux-no-sections .redux-main .redux-field:last-child { margin-bottom: 0 !important; } .postbox .redux-container.redux-has-sections .redux-main { background: #fff; } .postbox .redux-container.redux-has-sections .redux-main span.description { padding-bottom: 20px; } .postbox .redux-main h3 { cursor: text !important; -webkit-user-select: inherit !important; -moz-user-select: inherit !important; -ms-user-select: inherit !important; user-select: inherit !important; padding-left: 0 !important; } .redux-box-side .redux-main .redux-field-container { padding: 5px 0 0; } .redux-box-side .redux-main .redux-field-container .select2-container, .redux-box-side .redux-main .redux-field-container select { width: 100% !important; } .redux-box-side .form-table tr td { padding: 15px 0 !important; } .redux-box-side .form-table tr:last-child td { padding-bottom: 0 !important; } .redux-box-side .form-table tr:first-child td { padding-top: 5px !important; } #poststuff .redux-metabox h3.hndle, .metabox-holder .redux-metabox h3.hndle { cursor: pointer; border-bottom: 0; } .display-group { display: inherit !important; } /* Metaboxes CSS overrides */ @media (min-width: 1125px) and (max-width: 1405px) { .postbox table.form-table, .postbox .form-table > thead, .postbox .form-table > tbody, .postbox .form-table > tbody > tr > th, .postbox .form-table > tbody > tr > td, .postbox .form-table > tbody > tr { display: block !important; width: 100% !important; padding: 0 !important; } .postbox table.form-table.hide, .postbox .form-table > thead.hide, .postbox .form-table > tbody.hide, .postbox .form-table > tbody > tr > th.hide, .postbox .form-table > tbody > tr > td.hide, .postbox .form-table > tbody > tr.hide { display: none !important; } .postbox .form-table > tbody > tr > th, .postbox .form-table > tbody > tr > td { padding: 10px !important; } .postbox .form-table > tbody > tr > th { width: 35%; } } .redux-metabox .form-table th, .redux-metabox .form-table td { margin: 0; padding: 0; /* width: auto;*/ } .redux-box-side .redux-main .redux-field-container .select2-container, .redux-box-side .redux-main .redux-field-container select { width: 96% !important; } @media (max-width: 1405px) { .redux-box-side .redux-main .redux-field-container .select2-container, .redux-box-side .redux-main .redux-field-container select { width: 92% !important; } } @media (max-width: 1125px) { .redux-box-side .redux-main .redux-field-container .select2-container, .redux-box-side .redux-main .redux-field-container select { width: 100% !important; } } @media (max-width: 1405px) { .redux-main .form-table > tbody > tr > td { padding-top: 0 !important; padding-bottom: 0 !important; } .redux-main .redux-field-container { padding: 0 0 20px 0 !important; padding-bottom: 10px !important; } .postbox .form-table > tbody > tr > th { padding-bottom: 0 !important; } .redux_field_th { padding-top: 0 !important; padding-bottom: 10px !important; } } .redux-no-sections .redux-group-tab { display: block !important; } /* Light fresh theme */ .admin-color-fresh #poststuff .redux-metabox h3.hndle, .admin-color-fresh .metabox-holder .redux-metabox h3.hndle { background: #222222; color: #fff; } /* Light admin theme */ .admin-color-light #poststuff .redux-metabox h3.hndle, .admin-color-light .metabox-holder .redux-metabox h3.hndle { background: #888888; color: #fff; } /* Blue admin theme */ .admin-color-blue #poststuff .redux-metabox h3.hndle, .admin-color-blue .metabox-holder .redux-metabox h3.hndle { background: #096484; color: #fff; } /* Coffee admin theme */ .admin-color-coffee #poststuff .redux-metabox h3.hndle, .admin-color-coffee .metabox-holder .redux-metabox h3.hndle { background: #46403c; color: #fff; } /* Ectoplasm admin theme */ .admin-color-ectoplasm #poststuff .redux-metabox h3.hndle, .admin-color-ectoplasm .metabox-holder .redux-metabox h3.hndle { background: #413256; color: #fff; } /* Midnight admin theme */ .admin-color-midnight #poststuff .redux-metabox h3.hndle, .admin-color-midnight .metabox-holder .redux-metabox h3.hndle { background: #363b3f; color: #fff; } /* Ocean admin theme */ .admin-color-ocean #poststuff .redux-metabox h3.hndle, .admin-color-ocean .metabox-holder .redux-metabox h3.hndle { background: #627c83; color: #fff; } /* Sunrise admin theme */ .admin-color-sunrise #poststuff .redux-metabox h3.hndle, .admin-color-sunrise .metabox-holder .redux-metabox h3.hndle { background: #b43c38; color: #fff; } .redux-notices { margin-bottom: 0; border: 0; } .redux-metabox .redux-container { margin-top: 0; } .redux-metabox .inside { margin: 0 !important; padding: 0 !important; } .redux-metabox .redux-no-sections .redux-main { padding: 6px 15px 15px 15px !important; } .redux-metabox .redux-no-sections .redux-main .default_br { display: none; } .redux-metabox .redux-no-sections .redux-main .redux-field-container { padding: 10px 0 20px !important; } .redux-metabox .redux-no-sections .redux-main .redux_field_th { padding-top: 5px !important; } .redux-metabox .redux-no-sections.redux-box-side .redux-main { padding: 6px 8px 8px 8px !important; } .redux-metabox .redux-no-sections.redux-box-side .redux-main input[type=text] { width: 100% !important; } .wp-color-result { margin: 0 6px 0 0 !important; } .redux-container .ui-button-text-only .ui-button-text { padding: 0; } .wpseotab tr { display: table-row !important; } /*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlZHV4LWV4dGVuc2lvbi1tZXRhYm94ZXMuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHWTtDQUNJOztBQUtKO0NBQ0k7OztBQU9aO0NBQ0k7O0FBR0o7Q0FDSTs7QUFHSjtDQUNJO0NBQ0E7Q0FDQTtBQUNBO0NBRUE7QUFDQTtDQUVBO0NBQ0E7Q0FDQTtDQUNBOztBQUVBO0NBQ0k7O0FBR0o7Q0FDSTtDQUNBOztBQUdKO0NBQ0k7O0FBR0o7Q0FDSTtDQUNBO0NBQ0E7O0FBRUE7Q0FDSTs7QUFJUjtDQUNJO0NBQ0E7O0FBRUE7Q0FDSTtDQUNBO0NBQ0E7Q0FDQTtDQUNBOztBQUdJO0NBQ0k7O0FBSUE7QUFBQTtDQUVJOztBQUlSO0NBRUk7Q0FDQTs7QUFJUjtDQUNJOztBQUdKO0NBQ0k7O0FBR0o7Q0FDSTs7QUFNUjtDQUNJOztBQUVBO0NBQ0k7O0FBTWhCO0NBQ0k7Q0FDQTtDQUNBO0NBQ0E7Q0FDQTs7O0FBTUE7Q0FDSTs7QUFFQTtBQUFBO0NBRUk7O0FBT0o7Q0FDSTs7QUFHSjtDQUNJOztBQUdKO0NBQ0k7OztBQU9oQjtBQUFBO0NBRUk7Q0FDQTs7O0FBR0o7Q0FDSTs7O0FBR0o7QUFDQTtDQUVRO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtFQU1JO0VBQ0E7RUFDQTs7Q0FFQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7RUFDSTs7Q0FLSjtBQUFBO0VBRUk7O0NBSVI7RUFDSTs7O0FBS1o7QUFBQTtDQUVJO0NBQ0E7QUFDSjs7O0FBSUk7QUFBQTtDQUVJOzs7QUFJUjtDQUVRO0FBQUE7RUFFSTs7O0FBS1o7Q0FFUTtBQUFBO0VBRUk7OztBQUtaO0NBRVE7RUFDSTtFQUNBOztDQUdKO0VBQ0k7RUFDQTs7Q0FJUjtFQUNJOztDQUdKO0VBQ0k7RUFDQTs7O0FBSVI7Q0FDSTs7O0FBV0o7QUFQSTtBQUFBO0NBRUksWUFPdUM7Q0FOdkMsT0FNZ0Q7OztBQUd4RDtBQVpJO0FBQUE7Q0FFSSxZQVl1QztDQVh2QyxPQVdnRDs7O0FBR3hEO0FBakJJO0FBQUE7Q0FFSSxZQWlCdUM7Q0FoQnZDLE9BZ0JnRDs7O0FBR3hEO0FBdEJJO0FBQUE7Q0FFSSxZQXNCdUM7Q0FyQnZDLE9BcUJnRDs7O0FBR3hEO0FBM0JJO0FBQUE7Q0FFSSxZQTJCdUM7Q0ExQnZDLE9BMEJnRDs7O0FBR3hEO0FBaENJO0FBQUE7Q0FFSSxZQWdDdUM7Q0EvQnZDLE9BK0JnRDs7O0FBR3hEO0FBckNJO0FBQUE7Q0FFSSxZQXFDdUM7Q0FwQ3ZDLE9Bb0NnRDs7O0FBR3hEO0FBMUNJO0FBQUE7Q0FFSSxZQTBDdUM7Q0F6Q3ZDLE9BeUNnRDs7O0FBR3hEO0NBQ0k7Q0FDQTs7O0FBSUE7Q0FDSTs7QUFHSjtDQUNJO0NBQ0E7O0FBSUE7Q0FDSTs7QUFFQTtDQUNJOztBQUdKO0NBQ0k7O0FBR0o7Q0FDSTs7QUFLSjtDQUNJOztBQUNBO0NBQ0k7OztBQU9wQjtDQUNJOzs7QUFHSjtDQUNJOzs7QUFHSjtDQUNJIiwiZmlsZSI6InJlZHV4LWV4dGVuc2lvbi1tZXRhYm94ZXMuY3NzIn0= */ /*# sourceMappingURL=redux-extension-metaboxes.css.map */ /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}(); /* Styles for 'normal' meta boxes -------------------------------------------------------------- */ /* Clearfix for field */ .rwmb-field { display: flex; } .rwmb-field:not(:last-of-type) { margin: 0 0 12px; } .rwmb-label { width: 25%; } .rwmb-input { flex: 1; } .rwmb-label > label { font-weight: 600; } .rwmb-required { color: #dc3232; font-weight: bold; margin-left: 3px; } .rwmb-input h4 { margin: 0; } .rwmb-input input:not([size]), .rwmb-input-group, .rwmb-input select, .rwmb-input .select2-container, .rwmb-input textarea:not([cols]) { width: 100%; box-sizing: border-box; } .rwmb-input input[type="checkbox"], .rwmb-input input[type="radio"] { width: 1em; } .rwmb-input input[type="button"] { width: auto; } .rwmb-input input:not([type="checkbox"]):not([type="radio"]), .rwmb-input textarea, .rwmb-input select { max-width: 100%; margin-inline: 0; } .rwmb-textarea { resize: vertical; } /* Clone */ .rwmb-clone { min-height: 24px; margin-bottom: 12px; padding-right: 24px; position: relative; clear: both; background: #fff; } .rwmb-clone > input[type='radio'], .rwmb-clone > input[type='checkbox'] { margin: 6px 0 0 4px; } .rwmb-button.remove-clone { text-decoration: none; color: #ccc; display: inline-block; position: absolute; top: 0; right: 0; width: 20px; height: 20px; transition: color 200ms; } .rwmb-button.remove-clone .dashicons { font-size: 20px; } .rwmb-button.remove-clone:hover { color: #dc3232; } .remove-clone:focus { outline: 0; box-shadow: none; } .rwmb-button.add-clone { margin-top: 4px; } .rwmb-clone-icon { cursor: move; background: url(../img/drag_icon.gif) no-repeat; height: 23px; width: 15px; vertical-align: top; display: inline-block; position: absolute; left: 0; top: 0; } .rwmb-sort-clone { padding-left: 15px; } .rwmb-clone.rwmb-clone-template { display: none; } /* jQuery validation */ p.rwmb-error { color: #dc3232; margin: 4px 0; clear: both; } input.rwmb-error.rwmb-error, textarea.rwmb-error, select.rwmb-error { border-color: #dc3232; background: #ffebe8; } /* Utilities -------------------------------------------------------------- */ .rwmb-sortable-placeholder { background: #fcf8e3; border: 1px solid #faebcc; display: block; } /* Styles for 'side' meta boxes -------------------------------------------------------------- */ #side-sortables .rwmb-field { flex-direction: column; } #side-sortables .rwmb-label { width: 100%; margin-bottom: 4px; } /* Block editor */ .edit-post-meta-boxes-area.is-side .inside:has(.rwmb-meta-box) { padding-inline: 16px; } .edit-post-meta-boxes-area.is-side #poststuff .postbox:has(.rwmb-meta-box) h2.hndle { padding-left: 16px; font-weight: 500; color: #1e1e1e; } /* Mobile style */ @media (max-width: 782px) { .rwmb-field { flex-direction: column; } .rwmb-label { width: 100%; margin-bottom: 4px; } .rwmb-input input[type="radio"], .rwmb-input input[type="checkbox"] { width: 1.5625rem; } } /* Seamless style --------------------------------------------------------------*/ .rwmb-seamless { background: none; border: none; box-shadow: none; } .rwmb-seamless .inside.inside { padding-left: 0; padding-right: 0; } .postbox.rwmb-seamless .hndle, .postbox.rwmb-seamless .handlediv, .postbox.rwmb-seamless .postbox-header { display: none; } .rwmb-seamless .rwmb-clone { background: none; } /* CSS fixes --------------------------------------------------------------*/ /* Fix color picker field is hidden by the post editor at after_title position. https://metabox.io/support/topic/bug-color-picker-field-is-showed-below-the-title-field/ */ .postarea { position: relative; z-index: 0; } .rwmb-hidden-wrapper { display: none; }@keyframes zoomIn{from{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{animation-name:zoomIn} /*! dom-to-image 10-06-2017 */ /** * Dom-To-Image 2.6.0 * https://github.com/tsayen/dom-to-image * * Released under the MIT license * https://github.com/tsayen/dom-to-image/blob/master/LICENSE */ !function(a){"use strict";function b(a,b){function c(a){return b.bgcolor&&(a.style.backgroundColor=b.bgcolor),b.width&&(a.style.width=b.width+"px"),b.height&&(a.style.height=b.height+"px"),b.style&&Object.keys(b.style).forEach(function(c){a.style[c]=b.style[c]}),a}return b=b||{},g(b),Promise.resolve(a).then(function(a){return i(a,b.filter,!0)}).then(j).then(k).then(c).then(function(c){return l(c,b.width||q.width(a),b.height||q.height(a))})}function c(a,b){return h(a,b||{}).then(function(b){return b.getContext("2d").getImageData(0,0,q.width(a),q.height(a)).data})}function d(a,b){return h(a,b||{}).then(function(a){return a.toDataURL()})}function e(a,b){return b=b||{},h(a,b).then(function(a){return a.toDataURL("image/jpeg",b.quality||1)})}function f(a,b){return h(a,b||{}).then(q.canvasToBlob)}function g(a){"undefined"==typeof a.imagePlaceholder?v.impl.options.imagePlaceholder=u.imagePlaceholder:v.impl.options.imagePlaceholder=a.imagePlaceholder,"undefined"==typeof a.cacheBust?v.impl.options.cacheBust=u.cacheBust:v.impl.options.cacheBust=a.cacheBust}function h(a,c){function d(a){var b=document.createElement("canvas");if(b.width=c.width||q.width(a),b.height=c.height||q.height(a),c.bgcolor){var d=b.getContext("2d");d.fillStyle=c.bgcolor,d.fillRect(0,0,b.width,b.height)}return b}return b(a,c).then(q.makeImage).then(q.delay(100)).then(function(b){var c=d(a);return c.getContext("2d").drawImage(b,0,0),c})}function i(a,b,c){function d(a){return a instanceof HTMLCanvasElement?q.makeImage(a.toDataURL()):a.cloneNode(!1)}function e(a,b,c){function d(a,b,c){var d=Promise.resolve();return b.forEach(function(b){d=d.then(function(){return i(b,c)}).then(function(b){b&&a.appendChild(b)})}),d}var e=a.childNodes;return 0===e.length?Promise.resolve(b):d(b,q.asArray(e),c).then(function(){return b})}function f(a,b){function c(){function c(a,b){function c(a,b){q.asArray(a).forEach(function(c){b.setProperty(c,a.getPropertyValue(c),a.getPropertyPriority(c))})}a.cssText?b.cssText=a.cssText:c(a,b)}c(window.getComputedStyle(a),b.style)}function d(){function c(c){function d(a,b,c){function d(a){var b=a.getPropertyValue("content");return a.cssText+" content: "+b+";"}function e(a){function b(b){return b+": "+a.getPropertyValue(b)+(a.getPropertyPriority(b)?" !important":"")}return q.asArray(a).map(b).join("; ")+";"}var f="."+a+":"+b,g=c.cssText?d(c):e(c);return document.createTextNode(f+"{"+g+"}")}var e=window.getComputedStyle(a,c),f=e.getPropertyValue("content");if(""!==f&&"none"!==f){var g=q.uid();b.className=b.className+" "+g;var h=document.createElement("style");h.appendChild(d(g,c,e)),b.appendChild(h)}}[":before",":after"].forEach(function(a){c(a)})}function e(){a instanceof HTMLTextAreaElement&&(b.innerHTML=a.value),a instanceof HTMLInputElement&&b.setAttribute("value",a.value)}function f(){b instanceof SVGElement&&(b.setAttribute("xmlns","http://www.w3.org/2000/svg"),b instanceof SVGRectElement&&["width","height"].forEach(function(a){var c=b.getAttribute(a);c&&b.style.setProperty(a,c)}))}return b instanceof Element?Promise.resolve().then(c).then(d).then(e).then(f).then(function(){return b}):b}return c||!b||b(a)?Promise.resolve(a).then(d).then(function(c){return e(a,c,b)}).then(function(b){return f(a,b)}):Promise.resolve()}function j(a){return s.resolveAll().then(function(b){var c=document.createElement("style");return a.appendChild(c),c.appendChild(document.createTextNode(b)),a})}function k(a){return t.inlineAll(a).then(function(){return a})}function l(a,b,c){return Promise.resolve(a).then(function(a){return a.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(a)}).then(q.escapeXhtml).then(function(a){return''+a+""}).then(function(a){return''+a+""}).then(function(a){return"data:image/svg+xml;charset=utf-8,"+a})}function m(){function a(){var a="application/font-woff",b="image/jpeg";return{woff:a,woff2:a,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:b,jpeg:b,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function b(a){var b=/\.([^\.\/]*?)$/g.exec(a);return b?b[1]:""}function c(c){var d=b(c).toLowerCase();return a()[d]||""}function d(a){return a.search(/^(data:)/)!==-1}function e(a){return new Promise(function(b){for(var c=window.atob(a.toDataURL().split(",")[1]),d=c.length,e=new Uint8Array(d),f=0;f /*! For license information please see editor.js.LICENSE.txt */ !function(){"use strict";var e={"./packages/node_modules/react-dom/client.js":function(e,t,r){var n=r("react-dom"),o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t.createRoot=function(e,t){o.usingClientEntryPoint=!0;try{return n.createRoot(e,t)}finally{o.usingClientEntryPoint=!1}},t.hydrateRoot=function(e,t,r){o.usingClientEntryPoint=!0;try{return n.hydrateRoot(e,t,r)}finally{o.usingClientEntryPoint=!1}}},"./packages/packages/core/editor/src/components/shell.tsx":function(e,t,r){r.r(t),r.d(t,{default:function(){return Shell}});var n=r("react"),o=r("./packages/packages/core/editor/src/locations.ts");function Shell(){return n.createElement(n.Fragment,null,n.createElement(o.TopSlot,null),n.createElement("div",{style:{display:"none"}},n.createElement(o.LogicSlot,null)))}},"./packages/packages/core/editor/src/ensure-current-user.ts":function(e,t,r){r.r(t),r.d(t,{ensureCurrentUser:function(){return ensureCurrentUser}});var n=r("@elementor/editor-current-user"),o=r("@elementor/editor-v1-adapters");async function ensureCurrentUser(){return(0,o.registerDataHook)("after","editor/documents/attach-preview",async()=>{try{await(0,n.ensureUser)()}catch{}})}},"./packages/packages/core/editor/src/locations.ts":function(e,t,r){r.r(t),r.d(t,{LogicSlot:function(){return i},TopSlot:function(){return o},injectIntoLogic:function(){return a},injectIntoTop:function(){return c}});var n=r("@elementor/locations");const{Slot:o,inject:c}=(0,n.createLocation)(),{Slot:i,inject:a}=(0,n.createLocation)()},"./packages/packages/core/editor/src/start.tsx":function(e,t,r){r.r(t),r.d(t,{start:function(){return start}});var n=r("react"),o=r("react-dom"),c=r("./packages/node_modules/react-dom/client.js"),i=r("@elementor/editor-ui"),a=r("@elementor/editor-v1-adapters"),u=r("@elementor/query"),s=r("@elementor/store"),l=r("@elementor/ui"),_=r("./packages/packages/core/editor/src/components/shell.tsx"),d=r("./packages/packages/core/editor/src/ensure-current-user.ts");function start(e){const t=(0,s.__createStore)(),r=(0,u.createQueryClient)();(0,d.ensureCurrentUser)(),(0,a.__privateDispatchReadyEvent)(),function render(e,t){let r;try{const n=(0,c.createRoot)(t);r=()=>{n.render(e)}}catch{r=()=>{o.render(e,t)}}r()}(n.createElement(s.__StoreProvider,{store:t},n.createElement(u.QueryClientProvider,{client:r},n.createElement(l.DirectionProvider,{rtl:"rtl"===window.document.dir},n.createElement(l.ThemeProvider,null,n.createElement(i.GlobalDialog,null),n.createElement(_.default,null))))),e)}},"@elementor/editor-current-user":function(e){e.exports=window.elementorV2.editorCurrentUser},"@elementor/editor-ui":function(e){e.exports=window.elementorV2.editorUi},"@elementor/editor-v1-adapters":function(e){e.exports=window.elementorV2.editorV1Adapters},"@elementor/locations":function(e){e.exports=window.elementorV2.locations},"@elementor/query":function(e){e.exports=window.elementorV2.query},"@elementor/store":function(e){e.exports=window.elementorV2.store},"@elementor/ui":function(e){e.exports=window.elementorV2.ui},react:function(e){e.exports=window.React},"react-dom":function(e){e.exports=window.ReactDOM}},t={};function __webpack_require__(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,__webpack_require__),o.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){__webpack_require__.r(r),__webpack_require__.d(r,{injectIntoLogic:function(){return e.injectIntoLogic},injectIntoTop:function(){return e.injectIntoTop},start:function(){return t.start}});var e=__webpack_require__("./packages/packages/core/editor/src/locations.ts"),t=__webpack_require__("./packages/packages/core/editor/src/start.tsx")}(),(window.elementorV2=window.elementorV2||{}).editor=r}(),window.elementorV2.editor?.init?.(); //# sourceMappingURL=editor.js.map.king-addons-auto-scrolling-text { word-wrap: normal; word-break: break-word; white-space: nowrap; } .king-addons-auto-scrolling-text .king-addons-auto-scrolling-text-inner * { margin: 0; padding: 0; word-wrap: normal; word-break: keep-all; } .king-addons-auto-scrolling-text-gradient .king-addons-auto-scrolling-text-inner { -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .king-addons-auto-scrolling-text img { display: inline-block; } .king-addons-auto-scrolling-text-underline-gradient .king-addons-auto-scrolling-text-inner { position: relative; transition: all 0.25s ease-in; } .king-addons-auto-scrolling-text { width: auto; display: inline-block; } .king-addons-auto-scrolling-text-items { overflow: hidden; white-space: nowrap; box-sizing: border-box; position: relative; } .king-addons-auto-scrolling-text-wrapper { display: inline-block; white-space: nowrap; animation: king-addons-auto-scrolling-animation 20s linear infinite; } @keyframes king-addons-auto-scrolling-animation { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } } .swiper-container:not(.swiper-container-initialized) > .swiper-wrapper, .swiper:not(.swiper-initialized) > .swiper-wrapper { overflow: visible !important; }"use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.init=exports.settings=exports.name=exports.metadata=void 0;const block_json_1=__importDefault(require("./block.json")),edit_1=require("./edit"),utils_1=require("../../../utils"),{name,...metadata}=block_json_1.default;function init(){return(0,utils_1.registerProductEditorBlockType)({name,metadata,settings:exports.settings})}exports.name=name,exports.metadata=metadata,exports.settings={example:{},edit:edit_1.Edit},exports.init=init;// jscs:disable // jshint ignore: start /* global console, jsonView */ /* * ViewJSON * Version 1.0 * A Google Chrome extension to display JSON in a user-friendly format * * This is a chromeified version of the JSONView Firefox extension by Ben Hollis: * http://jsonview.com * http://code.google.com/p/jsonview * * Also based on the XMLTree Chrome extension by Moonty & alan.stroop * https://chrome.google.com/extensions/detail/gbammbheopgpmaagmckhpjbfgdfkpadb * * port by Jamie Wilkinson (@jamiew) | http://jamiedubs.com | http://github.com/jamiew * MIT license / copyfree (f) F.A.T. Lab http://fffff.at * Speed Project Approved: 2h */ function collapse( evt ) { var collapser = evt.target; var target = collapser.parentNode.getElementsByClassName( 'collapsible' ); if ( ! target.length ) { return; } target = target[0]; if ( target.style.display === 'none' ) { var ellipsis = target.parentNode.getElementsByClassName( 'ellipsis' )[0]; target.parentNode.removeChild( ellipsis ); target.style.display = ''; } else { target.style.display = 'none'; var ellipsis = document.createElement( 'span' ); ellipsis.className = 'ellipsis'; ellipsis.innerHTML = ' … '; target.parentNode.insertBefore( ellipsis, target ); } collapser.innerHTML = (collapser.innerHTML === '-') ? '+' : '-'; } function addCollapser( item ) { // This mainly filters out the root object (which shouldn't be collapsible). if ( item.nodeName !== 'LI' ) { return; } var collapser = document.createElement( 'div' ); collapser.className = 'collapser'; collapser.innerHTML = '-'; collapser.addEventListener( 'click', collapse, false ); item.insertBefore( collapser, item.firstChild ); } function jsonView( id, target ) { this.debug = false; if ( id.indexOf( '#' ) !== - 1 ) { this.idType = 'id'; this.id = id.replace( '#', '' ); } else if ( id.indexOf( '.' ) !== - 1 ) { this.idType = 'class'; this.id = id.replace( '.', '' ); } else { if ( this.debug ) { console.log( 'Can\'t find that element' ); } return; } this.data = document.getElementById( this.id ).innerHTML; if ( typeof (target) !== undefined ) { if ( target.indexOf( '#' ) !== - 1 ) { this.targetType = 'id'; this.target = target.replace( '#', '' ); } else if ( id.indexOf( '.' ) !== - 1 ) { this.targetType = 'class'; this.target = target.replace( '.', '' ); } else { if ( this.debug ) { console.log( 'Can\'t find the target element' ); } return; } } // Note: now using "*.json*" URI matching rather than these page regexes -- save CPU cycles! // var is_json = /^\s*(\{.*\})\s*$/.test(this.data); // var is_jsonp = /^.*\(\s*(\{.*\})\s*\)$/.test(this.data); // if(is_json || is_jsonp){ // Our manifest specifies that we only do URLs matching '.json', so attempt to sanitize any HTML // added by Chrome's "text/plain" or "text/html" handlers. if ( /^\(.*)\<\/pre\>$/.test( this.data ) ) { if ( this.debug ) { console.log( 'JSONView: data is wrapped in
...
, stripping HTML...' ); } this.data = this.data.replace( /<(?:.|\s)*?>/g, '' ); // Aggressively strip HTML. } // Test if what remains is JSON or JSONp. var json_regex = /^\s*([\[\{].*[\}\]])\s*$/; // Ghetto, but it works. var jsonp_regex = /^[\s\u200B\uFEFF]*([\w$\[\]\.]+)[\s\u200B\uFEFF]*\([\s\u200B\uFEFF]*([\[{][\s\S]*[\]}])[\s\u200B\uFEFF]*\);?[\s\u200B\uFEFF]*$/; var jsonp_regex2 = /([\[\{][\s\S]*[\]\}])\)/; // more liberal support... this allows us to pass the jsonp.json & jsonp2.json tests. var is_json = json_regex.test( this.data ); var is_jsonp = jsonp_regex.test( this.data ); if ( this.debug ) { console.log( 'JSONView: is_json=' + is_json + ' is_jsonp=' + is_jsonp ); } if ( is_json || is_jsonp ) { if ( this.debug ) { console.log( 'JSONView: sexytime!' ); } // JSONFormatter json->HTML prototype straight from Firefox JSONView // For reference: http://code.google.com/p/jsonview. function JSONFormatter() { // No magic required. } JSONFormatter.prototype = { htmlEncode: function( t ) { return t != null ? t.toString().replace( /&/g, '&' ).replace( /"/g, '"' ).replace( //g, '>' ) : ''; }, decorateWithSpan: function( value, className ) { return '' + this.htmlEncode( value ) + ''; }, // Convert a basic JSON datatype (number, string, boolean, null, object, array) into an HTML fragment. valueToHTML: function( value ) { var valueType = typeof value; var output = ''; if ( value === null ) { output += this.decorateWithSpan( 'null', 'null' ); } else if ( value && value.constructor === Array ) { output += this.arrayToHTML( value ); } else if ( valueType === 'object' ) { output += this.objectToHTML( value ); } else if ( valueType === 'number' ) { output += this.decorateWithSpan( value, 'num' ); } else if ( valueType === 'string' ) { if ( /^(http|https):\/\/[^\s]+$/.test( value ) ) { output += '' + this.htmlEncode( value ) + ''; } else { output += this.decorateWithSpan( '"' + value + '"', 'string' ); } } else if ( valueType === 'boolean' ) { output += this.decorateWithSpan( value, 'bool' ); } return output; }, // Convert an array into an HTML fragment arrayToHTML: function( json ) { var output = '[
    '; var hasContents = false; for ( var prop in json ) { hasContents = true; output += '
  • '; output += this.valueToHTML( json[prop] ); output += '
  • '; } output += '
]'; if ( ! hasContents ) { output = '[ ]'; } return output; }, // Convert a JSON object to an HTML fragment objectToHTML: function( json ) { var output = '{
    '; var hasContents = false; for ( var prop in json ) { hasContents = true; output += '
  • '; output += '' + this.htmlEncode( prop ) + ': '; output += this.valueToHTML( json[prop] ); output += '
  • '; } output += '
}'; if ( ! hasContents ) { output = '{ }'; } return output; }, // Convert a whole JSON object into a formatted HTML document. jsonToHTML: function( json, callback, uri ) { var output = ''; if ( callback ) { output += '
' + callback + ' (
'; output += '
'; } else { output += '
'; } output += this.valueToHTML( json ); output += '
'; if ( callback ) { output += '
)
'; } return this.toHTML( output, uri ); }, // Produce an error document for when parsing fails. errorPage: function( error, data, uri ) { // var output = '
' + this.stringbundle.GetStringFromName('errorParsing') + '
'; // output += '

' + this.stringbundle.GetStringFromName('docContents') + ':

';. var output = '
Error parsing JSON: ' + error.message + '
'; output += '

' + error.stack + ':

'; output += '
' + this.htmlEncode( data ) + '
'; return this.toHTML( output, uri + ' - Error' ); }, // Wrap the HTML fragment in a full document. Used by jsonToHTML and errorPage. toHTML: function( content ) { return content; } }; // Sanitize & output -- all magic from JSONView Firefox. this.jsonFormatter = new JSONFormatter(); // This regex attempts to match a JSONP structure: // * Any amount of whitespace (including unicode nonbreaking spaces) between the start of the file and the callback name. // * Callback name (any valid JavaScript function name according to ECMA-262 Edition 3 spec). // * Any amount of whitespace (including unicode nonbreaking spaces). // * Open parentheses. // * Any amount of whitespace (including unicode nonbreaking spaces). // * Either { or [, the only two valid characters to start a JSON string. // * Any character, any number of times. // * Either } or ], the only two valid closing characters of a JSON string. // * Any amount of whitespace (including unicode nonbreaking spaces). // * A closing parenthesis, an optional semicolon, and any amount of whitespace (including unicode nonbreaking spaces) until the end of the file. // This will miss anything that has comments, or more than one callback, or requires modification before use. var outputDoc = ''; // text = text.match(jsonp_regex)[1]; . var cleanData = '', callback = ''; var callback_results = jsonp_regex.exec( this.data ); if ( callback_results && callback_results.length === 3 ) { if ( this.debug ) { console.log( 'THIS IS JSONp' ); } callback = callback_results[1]; cleanData = callback_results[2]; } else { if ( this.debug ) { console.log( 'Vanilla JSON' ); } cleanData = this.data; } if ( this.debug ) { console.log( cleanData ); } // Covert, and catch exceptions on failure. try { // var jsonObj = this.nativeJSON.decode(cleanData); . var jsonObj = JSON.parse( cleanData ); if ( jsonObj ) { outputDoc = this.jsonFormatter.jsonToHTML( jsonObj, callback ); } else { throw 'There was no object!'; } } catch ( e ) { if ( this.debug ) { console.log( e ); } outputDoc = this.jsonFormatter.errorPage( e, this.data ); } var links = ''; if ( this.targetType !== undefined ) { this.idType = this.targetType; this.id = this.target; } var el; if ( this.idType === 'class' ) { el = document.getElementsByClassName( this.id ); if ( el ) { el.className += el.className ? ' jsonViewOutput' : 'jsonViewOutput'; el.innerHTML = links + outputDoc; } } else if ( this.idType === 'id' ) { el = document.getElementById( this.id ); if ( el ) { el.className += el.className ? ' jsonViewOutput' : 'jsonViewOutput'; el.innerHTML = links + outputDoc; } el.innerHTML = links + outputDoc; } var items = document.getElementsByClassName( 'collapsible' ); var len = items.length; for ( var i = 0; i < len; i ++ ) { addCollapser( items[i].parentNode ); } } else { // console.log("JSONView: this is not json, not formatting."); . } } @keyframes spinner__animation{0%{animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(-1turn)}}@keyframes loading__animation{to{transform:translateX(-100%)}}.wc-block-product-collection__pagination-animation{background-color:var(--wp--preset--color--primary,#000);height:4px;right:0;margin:0;max-width:100vw;opacity:0;padding:0;pointer-events:none;position:fixed;top:0;transform-origin:100% 0;width:100vw}.wc-block-product-collection__pagination-animation.start-animation{animation:wc-block-product-collection__pagination-start-animation 30s cubic-bezier(.03,.5,0,1) forwards}.wc-block-product-collection__pagination-animation.finish-animation{animation:wc-block-product-collection__pagination-finish-animation .3s ease-in}@keyframes wc-block-product-collection__pagination-start-animation{0%{opacity:1;transform:scaleX(0)}to{opacity:1;transform:scaleX(1)}}@keyframes wc-block-product-collection__pagination-finish-animation{0%{opacity:1}50%{opacity:1}to{opacity:0}}